{
a, b, c
OD
}

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a, b, c, min, i : integer;

begin
  readln (a, b, c);
  if (a<=b) and (a<=c) then
    min:=a;
  if (b<=a) and (b<=c) then
    min:=b;
  if (c<=a) and (c<=b) then
    min:=c;
  for i:= 1 to min do
  begin
    if (b mod i=0) and (a mod i=0) and (c mod i=0) then
      writeln(i);
  end;
  readln;
end.
 